package com.heop.andyou.core;

import android.app.Activity;
import android.os.Bundle;

public abstract class GameActivity extends Activity{
	GameView view;
	IGameRenderable renderable;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		renderable = initialize();
		view = new GameView(this, renderable);
		setContentView(view);
	}
	
	protected abstract IGameRenderable initialize();

	@Override
	protected void onDestroy() {
		super.onDestroy();
		renderable.dispose();
	}
}
